package StringAlgorithms;

import java.io.IOException;
import java.io.InputStreamReader;
import java.io.StreamTokenizer;

class Solver1723
{	String rec;
	char[] Alpha=new char[26];
	
	public void Solve() throws IOException
	{	int max=0,rs=-1;
		StreamTokenizer in=new StreamTokenizer(new InputStreamReader(System.in));
		in.nextToken();rec=in.sval;
		
		for (int i=0;i<Alpha.length;i++)
			Alpha[i]=0;
		for (int i=0;i<rec.length();i++)
		{	Alpha[rec.charAt(i)-'a']++;
			if (Alpha[rec.charAt(i)-'a']>max)
			{	max=Alpha[rec.charAt(i)-'a'];
				rs=i;
			}
		}
		if (rs!=-1)
			System.out.println(rec.charAt(rs));
	}
}
public class P1723
{	public static void main(String[] args) throws IOException
	{	Solver1723 solver=new Solver1723();
		solver.Solve();
	}
}
